package com.bjqh.edu.Bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2017/9/28.
 */

public class OrderDetail implements Parcelable {

    /**
     * order : {"uid":50,"id":327,"deviceinfor":"m2","course":{"id":50,"des":"适合小学二年级,一对一","price":0.1,"name":"免费试听","img":"/sys/course//1505724885634.png","discount":"1"},"coursedes":"适合小学一年级,一对一","time":1506603425000,"price":0.01,"status":1,"ordernum":"20170928205704795000","paytime":1506603444000,"cid":13,"coursename":"免费试听课"}
     * msg : success
     * status : 200
     */

    private OrderBean order;
    private String msg;
    private int status;

    public OrderBean getOrder() {
        return order;
    }

    public void setOrder(OrderBean order) {
        this.order = order;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public static class OrderBean implements Parcelable {
        /**
         * uid : 50
         * id : 327
         * deviceinfor : m2
         * course : {"id":50,"des":"适合小学二年级,一对一","price":0.1,"name":"免费试听","img":"/sys/course//1505724885634.png","discount":"1"}
         * coursedes : 适合小学一年级,一对一
         * time : 1506603425000
         * price : 0.01
         * status : 1
         * ordernum : 20170928205704795000
         * paytime : 1506603444000
         * cid : 13
         * coursename : 免费试听课
         */

        private int uid;
        private int id;
        private String deviceinfor;
        private CourseBean course;
        private String coursedes;
        private long time;
        private double price;
        private int status;
        private String ordernum;
        private long paytime;
        private int cid;
        private String coursename;

        public int getUid() {
            return uid;
        }

        public void setUid(int uid) {
            this.uid = uid;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getDeviceinfor() {
            return deviceinfor;
        }

        public void setDeviceinfor(String deviceinfor) {
            this.deviceinfor = deviceinfor;
        }

        public CourseBean getCourse() {
            return course;
        }

        public void setCourse(CourseBean course) {
            this.course = course;
        }

        public String getCoursedes() {
            return coursedes;
        }

        public void setCoursedes(String coursedes) {
            this.coursedes = coursedes;
        }

        public long getTime() {
            return time;
        }

        public void setTime(long time) {
            this.time = time;
        }

        public double getPrice() {
            return price;
        }

        public void setPrice(double price) {
            this.price = price;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getOrdernum() {
            return ordernum;
        }

        public void setOrdernum(String ordernum) {
            this.ordernum = ordernum;
        }

        public long getPaytime() {
            return paytime;
        }

        public void setPaytime(long paytime) {
            this.paytime = paytime;
        }

        public int getCid() {
            return cid;
        }

        public void setCid(int cid) {
            this.cid = cid;
        }

        public String getCoursename() {
            return coursename;
        }

        public void setCoursename(String coursename) {
            this.coursename = coursename;
        }

        public static class CourseBean implements Parcelable {
            /**
             * id : 50
             * des : 适合小学二年级,一对一
             * price : 0.1
             * name : 免费试听
             * img : /sys/course//1505724885634.png
             * discount : 1
             */

            private String id;
            private String des;
            private double price;
            private String name;
            private String img;
            private String discount;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getDes() {
                return des;
            }

            public void setDes(String des) {
                this.des = des;
            }

            public double getPrice() {
                return price;
            }

            public void setPrice(double price) {
                this.price = price;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getImg() {
                return img;
            }

            public void setImg(String img) {
                this.img = img;
            }

            public String getDiscount() {
                return discount;
            }

            public void setDiscount(String discount) {
                this.discount = discount;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(this.id);
                dest.writeString(this.des);
                dest.writeDouble(this.price);
                dest.writeString(this.name);
                dest.writeString(this.img);
                dest.writeString(this.discount);
            }

            public CourseBean() {
            }

            protected CourseBean(Parcel in) {
                this.id = in.readString();
                this.des = in.readString();
                this.price = in.readDouble();
                this.name = in.readString();
                this.img = in.readString();
                this.discount = in.readString();
            }

            public static final Creator<CourseBean> CREATOR = new Creator<CourseBean>() {
                @Override
                public CourseBean createFromParcel(Parcel source) {
                    return new CourseBean(source);
                }

                @Override
                public CourseBean[] newArray(int size) {
                    return new CourseBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.uid);
            dest.writeInt(this.id);
            dest.writeString(this.deviceinfor);
            dest.writeParcelable(this.course, flags);
            dest.writeString(this.coursedes);
            dest.writeLong(this.time);
            dest.writeDouble(this.price);
            dest.writeInt(this.status);
            dest.writeString(this.ordernum);
            dest.writeLong(this.paytime);
            dest.writeInt(this.cid);
            dest.writeString(this.coursename);
        }

        public OrderBean() {
        }

        protected OrderBean(Parcel in) {
            this.uid = in.readInt();
            this.id = in.readInt();
            this.deviceinfor = in.readString();
            this.course = in.readParcelable(CourseBean.class.getClassLoader());
            this.coursedes = in.readString();
            this.time = in.readLong();
            this.price = in.readDouble();
            this.status = in.readInt();
            this.ordernum = in.readString();
            this.paytime = in.readLong();
            this.cid = in.readInt();
            this.coursename = in.readString();
        }

        public static final Parcelable.Creator<OrderBean> CREATOR = new Parcelable.Creator<OrderBean>() {
            @Override
            public OrderBean createFromParcel(Parcel source) {
                return new OrderBean(source);
            }

            @Override
            public OrderBean[] newArray(int size) {
                return new OrderBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.order, flags);
        dest.writeString(this.msg);
        dest.writeInt(this.status);
    }

    public OrderDetail() {
    }

    protected OrderDetail(Parcel in) {
        this.order = in.readParcelable(OrderBean.class.getClassLoader());
        this.msg = in.readString();
        this.status = in.readInt();
    }

    public static final Parcelable.Creator<OrderDetail> CREATOR = new Parcelable.Creator<OrderDetail>() {
        @Override
        public OrderDetail createFromParcel(Parcel source) {
            return new OrderDetail(source);
        }

        @Override
        public OrderDetail[] newArray(int size) {
            return new OrderDetail[size];
        }
    };
}
